import jsCookies from 'js-cookie'

const CLINIC_KEY = 'select-clinic'
const USER_NAME = 'select-user'
const PARENT_KEY = 'select-parent-id'

export function getClinicId() {
  return jsCookies.get(CLINIC_KEY)
}

export function setClinics(clinic) {
  return jsCookies.set(CLINIC_KEY, clinic)
}

export function removeClinics() {
  return jsCookies.remove(CLINIC_KEY)
}

export function getUser() {
  return jsCookies.get(USER_NAME)
}

export function setUser(name) {
  return jsCookies.set(USER_NAME, name)
}

export function removeUser() {
  return jsCookies.remove(USER_NAME)
}

export function getParentId() {
  return jsCookies.get(PARENT_KEY)
}

export function setParentId(parentId) {
  return jsCookies.set(PARENT_KEY, parentId)
}
